<template>
  <tfoot>
    <tr>
      <td>合计:</td>
      <td colspan="5">{{ allPrice }}</td>
    </tr>
  </tfoot>
</template>

<script>
export default {
  props: ["arr"],
  computed: {
    allPrice() {
      return Math.floor(this.arr.reduce((sum, item) => (sum += item.price), 0));
    },
  },
};
</script>